const express = require('express')
const lognRouter = express.Router()
lognRouter.post('/enroll', (req, res) => {
    var username = req.body.username;
    var password = req.body.password;
    console.log(username,password);
    if(username =='admin'&&password =='123456'){
        res.json({
            per:'1',
            massage:'登录成功'
        })
    }
    else if(username =='admin'&&password =='000000'){
        res.json({
            per:'2',
            massage:'管理员登录成功'
        })
    }
    else{
        res.json({
            per:'0',
            massage:'登录失败'
        })
    }
   
})

module.exports = lognRouter